package com.cookie.controller;

import com.cookie.entity.Note;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dyx
 * @description
 * @date 2024/12/25 16:12
 **/
@RestController
@RequestMapping("/api/get")
public class GetNoteController {
    @GetMapping("/get-note")
    public Note PostNote(@RequestParam(value = "title", defaultValue = "none") String title) {
        Note note = new Note();

        note.setTitle(title);
        note.setContent("What's up");
        note.setAuthor("cookie");
        note.setLabel("TEST");

        return note;
    }
}
